﻿using HuaweiCloud.Dotnet.Samples.Common;
using HuaweiCloud.Dotnet.Samples.ESports.Main.Dtos;
using HuaweiCloud.Dotnet.Samples.ESports.Main.Entities;

namespace HuaweiCloud.Dotnet.Samples.ESports.Main.Service
{
    public interface IPointsService : ICrudApplicationService<Points, UpdatePointsDto, UpdatePointsDto, PointsDto>
    {
        /// <summary>
        /// 增加指定用户的积分
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <param name="scores">增加的积分</param>
        /// <param name="token">取消任务的Token</param>
        /// <returns></returns>
        Task AddScoresAsync(Guid userId, int scores, CancellationToken token = default);
        /// <summary>
        /// 获取指定用户的积分
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        Task<PointsDto> GetScoresByUserIdAsync(Guid userId, CancellationToken token = default);
    }
}
